]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ctrlAltTab: Add a "Windows" option to Ctrl+Alt+Tab
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 4 Dec 2012 18:46:47 +0000 (13:46 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 6 Dec 2012 17:25:37 +0000 (12:25 -0500)
This lets accessibility users easily access the desktop after focusing the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=689653

js/ui/ctrlAltTab.js

index 215a7227158898a2a143ae357c066065b98a6b08..a6c22eda42b41cee02a0fd45ffb8c9f9381636ca 100644 (file)
@@ -26,6 +26,9 @@ const CtrlAltTabManager = new Lang.Class({
 
     _init: function() {
         this._items = [];
+        this.addGroup(global.window_group, _("Windows"),
+                      'emblem-documents-symbolic', { sortGroup: SortGroup.TOP,
+                                                     focusCallback: Lang.bind(this, this._focusWindows) });
     },
 
     addGroup: function(root, name, icon, params) {
@@ -121,6 +124,12 @@ const CtrlAltTabManager = new Lang.Class({
                                           this._popup = null;
                                       }));
         }
+    },
+
+    _focusWindows: function(timestamp) {
+        global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
+        global.stage.key_focus = null;
+        global.screen.focus_default_window(timestamp);
     }
 });